﻿using DomainEventDemo.PlanLogs;
using DomainEventDemo.Plans;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling;

namespace DomainEventDemo.EntityFrameworkCore
{
    public static class PlaningDomainEventDemoDbContextModelCreatingExtensions
    {
        public static void ConfigureDomainEventDemo(this ModelBuilder builder)
        {
            Check.NotNull(builder, nameof(builder));

            builder.Entity<Plan>(b =>
            {
                b.ToTable("Plans");
                b.ConfigureByConvention();
            });

            builder.Entity<PlanLog>(b =>
            {
                b.ToTable("PlanLogs");
                b.ConfigureByConvention();
            });
        }
    }
}